/**
 * Copyright © 2013 Creativor Studio.
 * About license information, please see LICENSE.txt.
 */
package org.creativor.rayson.server.transport.http;

import org.creativor.rayson.share.annotation.NotNull;
import org.creativor.rayson.share.transport.ByteArrayBuffer;
import org.creativor.rayson.share.transport.http.AbstractHttpMessage;
import org.creativor.rayson.share.transport.http.ExtendedHttpHeaders;
import org.creativor.rayson.share.transport.http.HttpRequest;
import org.creativor.rayson.share.transport.http.HttpRequestLine;

/**
 * Server side {@link HttpRequest} object.
 * 
 * @author creativor
 */
public class ServerHttpRequest extends AbstractHttpMessage implements
		HttpRequest {

	public ServerHttpRequest(@NotNull final ExtendedHttpHeaders httpHeaders) {
		super(httpHeaders);
		httpHeaders.setMessage(this);
	}

	@Override
	public HttpRequestLine getStartLine() {
		return (HttpRequestLine) super.getStartLine();
	}

	@Override
	public void setBody(@NotNull final byte[] body) {
		super.setBody(body);
	}

	public void setStartLine(@NotNull final HttpRequestLine startLine) {
		super.setStartLine(startLine);
	}

	@Override
	public void writeTo(final ByteArrayBuffer buffer) {
		throw new UnsupportedOperationException();
	}
}
